import request from '@/utils/request'

// 查询试卷管理列表
export function listExam(query) {
  return request({
    url: '/exam/exam/list',
    method: 'get',
    params: query
  })
}
// 课程试卷
export function getCascade(query) {
  return request({
    url: '/tk/tk/getCascaderByPaper',
    method: 'get'
  })
}
// 查询试卷管理详细
export function getExam(examId) {
  return request({
    url: '/exam/exam/' + examId,
    method: 'get'
  })
}

// 新增试卷管理
export function addExam(data) {
  return request({
    url: '/exam/exam',
    method: 'post',
    data: data
  })
}

// 修改试卷管理
export function updateExam(data) {
  return request({
    url: '/exam/exam',
    method: 'put',
    data: data
  })
}

// 删除试卷管理
export function delExam(examId) {
  return request({
    url: '/exam/exam/' + examId,
    method: 'delete'
  })
}

// 导出试卷管理
export function exportExam(query) {
  return request({
    url: '/exam/exam/export',
    method: 'get',
    params: query
  })
}